home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Pvfork(2) Oct. 1, 1991 Pvfork(2)
-
-
- N✓NA✓AM✓ME✓E
- Pvfork - create a copy of the current process
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- WORD Pvfork();
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- _✓P_✓v_✓f_✓o_✓r_✓k creates a copy of the current process. Both the
- child (the new process created) and the parent (the pro-
- cess which first made the call) share the same address
- space, i.e. any changes that the child makes to variables
- will also be noticed by the parent. The new process
- begins execution with an apparent return from the _✓P_✓v_✓f_✓o_✓r_✓k
- call.
-
- Because the two processes share the same address space,
- including the same stack, there could be many problems if
- they actually were running at the same time. Therefore,
- the parent process is suspended until the child process
- either exits or uses mode 200 of _✓P_✓e_✓x_✓e_✓c to overlay itself
- with a new program in a new address space.
-
- R✓RE✓ET✓TU✓UR✓RN✓NS✓S
- 0 in the child
-
- The new process id (a positive number), in the parent.
-
- ENSMEM if there is not enough memory to create the new
- process.
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- _✓P_✓e_✓x_✓e_✓c(2), _✓P_✓f_✓o_✓r_✓k(2)
-
- B✓BU✓UG✓GS✓S
- If the parent is in supervisor mode when this call is
- made, the child will be started in user mode anyway; thus,
- it is strongly recommended that this call be made only
- from user mode.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Version 0.9 MiNT Programmer's Manual 1
-
-
-